package com.ruoyi.boc.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.boc.mapper.BocAuthInfoMapper;
import com.ruoyi.boc.domain.BocAuthInfo;
import com.ruoyi.boc.service.IBocAuthInfoService;

/**
 * 授权信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-11-08
 */
@Service
public class BocAuthInfoServiceImpl implements IBocAuthInfoService 
{
    @Autowired
    private BocAuthInfoMapper bocAuthInfoMapper;

    /**
     * 查询授权信息
     * 
     * @param authId 授权信息主键
     * @return 授权信息
     */
    @Override
    public BocAuthInfo selectBocAuthInfoByAuthId(Long authId)
    {
        return bocAuthInfoMapper.selectBocAuthInfoByAuthId(authId);
    }

    /**
     * 查询授权信息列表
     * 
     * @param bocAuthInfo 授权信息
     * @return 授权信息
     */
    @Override
    public List<BocAuthInfo> selectBocAuthInfoList(BocAuthInfo bocAuthInfo)
    {
        return bocAuthInfoMapper.selectBocAuthInfoList(bocAuthInfo);
    }

    /**
     * 新增授权信息
     * 
     * @param bocAuthInfo 授权信息
     * @return 结果
     */
    @Override
    public int insertBocAuthInfo(BocAuthInfo bocAuthInfo)
    {
        bocAuthInfo.setCreateTime(DateUtils.getNowDate());
        return bocAuthInfoMapper.insertBocAuthInfo(bocAuthInfo);
    }

    /**
     * 修改授权信息
     * 
     * @param bocAuthInfo 授权信息
     * @return 结果
     */
    @Override
    public int updateBocAuthInfo(BocAuthInfo bocAuthInfo)
    {
        bocAuthInfo.setUpdateTime(DateUtils.getNowDate());
        return bocAuthInfoMapper.updateBocAuthInfo(bocAuthInfo);
    }

    /**
     * 批量删除授权信息
     * 
     * @param authIds 需要删除的授权信息主键
     * @return 结果
     */
    @Override
    public int deleteBocAuthInfoByAuthIds(Long[] authIds)
    {
        return bocAuthInfoMapper.deleteBocAuthInfoByAuthIds(authIds);
    }

    /**
     * 删除授权信息信息
     * 
     * @param authId 授权信息主键
     * @return 结果
     */
    @Override
    public int deleteBocAuthInfoByAuthId(Long authId)
    {
        return bocAuthInfoMapper.deleteBocAuthInfoByAuthId(authId);
    }
}
